﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RolesManagementPage.aspx.cs" Inherits="WebApplication.Restricted.Security.Roles.RolesManagementPage" %>

<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RolesGrid">
                <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RolesGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    
    <telerik:RadGrid ID="RolesGrid" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
        AllowSorting="True" DataSourceID="MerchEntityDataSource" GridLines="None" ShowFooter="True"
        Skin="WebBlue"
        OnInsertCommand="RolesGridInsertCommand" 
        OnUpdateCommand="RolesGridUpdateCommand" 
        OnCancelCommand="RolesGrid_CancelCommand">
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id" 
            DataSourceID="MerchEntityDataSource" CommandItemDisplay="Top" 
            EditMode="PopUp">
            <Columns>
                <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" ReadOnly="True"
                    SortExpression="Id" UniqueName="Id">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                    UniqueName="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description"
                    UniqueName="Description">
                </telerik:GridBoundColumn>
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
            </Columns>
            <EditFormSettings EditFormType="WebUserControl" UserControlName="~/Controls/Security/Roles/RolesEditControl.ascx">
                <EditColumn UniqueName="EditCommandColumn1" >
                </EditColumn>
                <popupsettings modal="True" />
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
        </ClientSettings>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="MerchEntityDataSource" runat="server" ConnectionString="name=MerchModelEntities"
        DefaultContainerName="MerchModelEntities" EntitySetName="Role">
    </asp:EntityDataSource>
    
    </form>
</body>
</html>
